<html><head><title>Debugger keywords in PureBasic</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="5">Debugger keywords in PureBasic</font></b></p>

<p><b>Overview</b></p><blockquote>


A complete description of all functions of the powerful debugger you will find 
in the extra chapters <a href="../reference/ide_debugger.html">Using the debugger</a> or 
<a href="../reference/ide_debugtools.html">Using the debugging Tools</a>. 
<br>
<br>
Following is a list of special keywords to control the debugger from your source code. 
There is also a <a href="../debugger/index.html">Debugger library</a> which provides further 
functions to modify the behavior of the debugger should it be present. 
<br>
<br>


</blockquote>
<br><b>Syntax</b><blockquote><pre><font face="Courier New, Courier, mono"size="2">
  <b><font color="#006666">CallDebugger</font></b>
  </font></pre></blockquote>
<b>Description</b><br><blockquote>


This invokes the "debugger" and freezes the program immediately. 


</blockquote>
<br><b>Syntax</b><blockquote><pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">Debug</font></b> &#060;expression&#062; [, DebugLevel]
  </font></pre></blockquote>
<b>Description</b><br><blockquote>


Display the <a href="../reference/ide_debugtools.html">DebugOutput</a> window and the result inside it. The expression can be 
any valid PureBasic expression, from numeric to string. An important point is 
the Debug command and its associated expression is totally ignored (not compiled) 
when the debugger is deactivated. <br>
<br>
Note: This is also true, if you're using complete command lines after Debug 
(e.g. Debug LoadImage(1,"test.bmp")). They will not be compiled with disabled debugger! <br>
<br>
This means this command can be used to trace easily in the program without having 
to comment all the debug commands when creating the final executable. <br>
<br>
The 'DebugLevel' is the level of priority of the debug message. All normal debug message 
(without specifying a debug level) are automatically displayed. When a level is specified 
then the message will be only displayed if the current DebugLevel (set with the 
following <b><font color="#006666">DebugLevel</font></b> command) is equals or above this number. This allows hierarchical 
debug mode, by displaying more and more precise information in function of the used DebugLevel. 


</blockquote>
<br><b>Syntax</b><blockquote><pre><font face="Courier New, Courier, mono"size="2">
  <b><font color="#006666">DebugLevel</font></b> &#060;constant expression&#062;
</font></pre></blockquote>
<b>Description</b><br><blockquote>


Set the current debug level for the 'Debug' message. 
<br>
<br>
Note: The debug level is set at compile time, which means you have to put the 
<b><font color="#006666">DebugLevel</font></b> command before any other Debug commands to be sure it affects them all. 


</blockquote>
<br><b>Syntax</b><blockquote><pre><font face="Courier New, Courier, mono"size="2">  
  <b><font color="#006666">DisableDebugger</font></b>
</font></pre></blockquote>
<b>Description</b><br><blockquote>


This will disable the debugger checks on the source code which follow this command. 


</blockquote>
<br><b>Syntax</b><blockquote><pre><font face="Courier New, Courier, mono"size="2">  
  <b><font color="#006666">EnableDebugger</font></b>
  </font></pre></blockquote>
<b>Description</b><br><blockquote>


This will enable the debugger checks on the source code which follow this command 
(if the debugger was previously disabled with <b><font color="#006666">DisableDebugger</font></b>). 
<br>
<br>
Note: <b><font color="#006666">EnableDebugger</font></b> doesn't have an effect, if the debugger is completely 
disabled in the IDE (look at <a href="../reference/ide_debugger.html">Compiler settings</a>). 

</body></html>